package cn.mst.vrs.controller.app.venue;

import cn.iocoder.yudao.framework.common.pojo.CommonResult;
import cn.mst.vrs.common.entity.PageResult;
import cn.mst.vrs.controller.app.venue.vo.VenueSearchReqVO;
import cn.mst.vrs.controller.app.venue.vo.VenueSearchRespVO;
import cn.mst.vrs.service.venue.VenueService;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import jakarta.annotation.Resource;
import org.springdoc.core.annotations.ParameterObject;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success;

@Tag(name = "WX - 场地API")
@RestController
@RequestMapping("/vrs/venue")
public class VenueAppController {
    @Resource
    private VenueService venueService;

    @GetMapping("/search/page")
    @Operation(summary = "搜索场地列表")
    public CommonResult<PageResult<VenueSearchRespVO>> searchPageVenue(@ParameterObject VenueSearchReqVO reqVO) {
        return success(venueService.searchPageVenue(reqVO));
    }

    @GetMapping("/detail")
    @Operation(summary = "获取场地详情")
    public CommonResult<VenueSearchRespVO> getVenueDetail(Long id) {
        return success(venueService.getVenueDetail(id));
    }
}
